package jzOffer;

public class Num53of2 {
    public int missingNumber(int[] nums) {
        int i=0;
        int j=nums.length-1;
        while(i<=j){
            int mid=(i+j)/2;
            if(mid==nums[mid]){
                i=mid+1;
            }else{
                j=mid-1;
            }
        }
        return i;
    }
}
